package com.xjrsoft.module.customerTwo.EMP.total_water_and_electricity_expenses.service.impl;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.xjrsoft.core.tool.utils.StringUtil;
import com.xjrsoft.module.customerTwo.EMP.total_water_and_electricity_expenses.entity.Table65204792021317750000;
import com.xjrsoft.module.customerTwo.EMP.total_water_and_electricity_expenses.dto.Table65204792021317750000ListDto;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.xjrsoft.common.page.ConventPage;
import com.xjrsoft.common.page.PageOutput;
import java.util.List;
import com.xjrsoft.module.customerTwo.EMP.total_water_and_electricity_expenses.mapper.Table65204792021317750000Mapper;
import com.xjrsoft.module.customerTwo.EMP.total_water_and_electricity_expenses.service.ITable65204792021317750000Service;
import com.xjrsoft.core.mp.base.BaseService;
import com.xjrsoft.core.tool.utils.Func;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;

/**
 *  服务实现类
 *
 * @author system
 * @since 2023-12-07
 */
@Service
@AllArgsConstructor
public class Table65204792021317750000ServiceImpl extends BaseService<Table65204792021317750000Mapper, Table65204792021317750000> implements ITable65204792021317750000Service {


	@Override
	public IPage<Table65204792021317750000> getPageList(Table65204792021317750000ListDto pageListDto) {
		Wrapper<Table65204792021317750000> wrapper = Wrappers.<Table65204792021317750000>query().lambda()
				.like(!StringUtil.isEmpty(pageListDto.getField11628da()), Table65204792021317750000::getField11628da, pageListDto.getField11628da())
				.like(!StringUtil.isEmpty(pageListDto.getField115fafb()), Table65204792021317750000::getField115fafb, pageListDto.getField115fafb())
				.like(!StringUtil.isEmpty(pageListDto.getField114951c()), Table65204792021317750000::getField114951c, pageListDto.getField114951c())
				.like(!StringUtil.isEmpty(pageListDto.getField113fb3d()), Table65204792021317750000::getField113fb3d, pageListDto.getField113fb3d())
				.like(!StringUtil.isEmpty(pageListDto.getField11293c8()), Table65204792021317750000::getField11293c8, pageListDto.getField11293c8())
				.like(!StringUtil.isEmpty(pageListDto.getField111030b()), Table65204792021317750000::getField111030b, pageListDto.getField111030b())
				.like(!StringUtil.isEmpty(pageListDto.getField11026f2()), Table65204792021317750000::getField11026f2, pageListDto.getField11026f2())
				.like(!StringUtil.isEmpty(pageListDto.getField1098cb4()), Table65204792021317750000::getField1098cb4, pageListDto.getField1098cb4())
				.like(!StringUtil.isEmpty(pageListDto.getField1086187()), Table65204792021317750000::getField1086187, pageListDto.getField1086187())
				.like(!StringUtil.isEmpty(pageListDto.getField10729f3()), Table65204792021317750000::getField10729f3, pageListDto.getField10729f3())
				.like(!StringUtil.isEmpty(pageListDto.getField106bc7b()), Table65204792021317750000::getField106bc7b, pageListDto.getField106bc7b())
				.like(!StringUtil.isEmpty(pageListDto.getField10086b5()), Table65204792021317750000::getField10086b5, pageListDto.getField10086b5())
				.like(!StringUtil.isEmpty(pageListDto.getField1018725()), Table65204792021317750000::getField1018725, pageListDto.getField1018725())
				.like(!StringUtil.isEmpty(pageListDto.getField1022deb()), Table65204792021317750000::getField1022deb, pageListDto.getField1022deb())
				.like(!StringUtil.isEmpty(pageListDto.getField103aa26()), Table65204792021317750000::getField103aa26, pageListDto.getField103aa26())
				.like(!StringUtil.isEmpty(pageListDto.getField10524d3()), Table65204792021317750000::getField10524d3, pageListDto.getField10524d3())
				.like(!StringUtil.isEmpty(pageListDto.getField10472f1()), Table65204792021317750000::getField10472f1, pageListDto.getField10472f1());
		return this.page(ConventPage.getPage(pageListDto), wrapper);
	}

	@Override
	public boolean addTable65204792021317750000(Table65204792021317750000 table65204792021317750000) {
		boolean isSuccess = this.save(table65204792021317750000);
		return isSuccess;
	}

	@Override
	public boolean updateTable65204792021317750000(String id, Table65204792021317750000 table65204792021317750000) {
		table65204792021317750000.setId(id);
		return this.updateById(table65204792021317750000);
	}

	public boolean delete(String ids) {
		List<String> idList = Func.toStrList(ids);
		if (this.removeByIds(idList)) {
			return true;
		}
		return false;
	}

}